from math import comb


def binomial_expansion(a, b, n):
    result = []
    for i in range(n + 1):
        temp = comb(n, i) * (a ** (n - i)) * (b ** (i))
        result.append(temp)

    print(result)


if __name__ == '__main__':
    # print(comb(5, 2))
    binomial_expansion(2, 3, 5)